    <div class="form-group-title" style="margin-top: -25px">上下线关系设置</div>
           <div class="form-group">
                <label class="col-lg control-label">成为下线条件</label>
                <div class="col-sm-9 col-xs-12">
                	{ifp 'commission.set.edit'}
	                    <label class="radio-inline"><input type="radio"  name="data[become_child]" value="0" {if $data['become_child'] ==0} checked="checked"{/if} /> 首次点击分享链接</label>
	                    <label class="radio-inline"><input type="radio"  name="data[become_child]" value="1" {if $data['become_child'] ==1} checked="checked"{/if} /> 首次下单</label>
	                    <label class="radio-inline"><input type="radio"  name="data[become_child]" value="2" {if $data['become_child'] ==2} checked="checked"{/if} /> 首次付款</label>
	                    <span class='help-block'>首次点击分享链接： 可以自由设置分销商条件</span>
	                    <span class='help-block'>首次下单/首次付款： 无条件不可用</span>
                    {else}
                    	{if $data['become_child'] ==0}首次点击分享链接{/if}
                    	{if $data['become_child'] ==1}首次下单{/if}
                    	{if $data['become_child'] ==2}首次下单{/if}
                    {/if}
                </div>
               </div>

            <div class="form-group">
                <label class="col-lg control-label">我的邀请码</label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'commission.set.edit'}
                        <label class="radio-inline"><input type="radio"  name="data[hideicode]" value="0" {if empty($data['hideicode'])}checked="checked"{/if} /> 开启</label>
                        <label class="radio-inline"><input type="radio"  name="data[hideicode]" value="1" {if !empty($data['hideicode'])}checked="checked"{/if} /> 关闭</label>
                    {else}
                        {if empty($data['hideicode'])}开启{else}关闭{/if}
                    {/if}
                </div>
            </div>
	    
    <div class="form-group-title">分销资格设置</div>
		
            <div class="form-group">
                <label class="col-lg control-label">成为分销商条件</label>
                <div class="col-sm-9 col-xs-12">
                	{ifp 'commission.set.edit'}
	                	<label class="radio-inline"><input type="radio"  name="data[become]" value="0" {if $data['become'] ==0} checked="checked"{/if} data-needcheck="1" onclick="showBecome(this)" /> 无条件</label>
	                    <label class="radio-inline"><input type="radio"  name="data[become]" value="1" {if $data['become'] ==1} checked="checked"{/if} data-needcheck="1" onclick="showBecome(this)"/> 申请</label>
	                    <label class="radio-inline"><input type="radio"  name="data[become]" value="2" {if $data['become'] ==2} checked="checked"{/if} data-needcheck="1" onclick="showBecome(this)"/> 消费次数</label>
						<label class="radio-inline"><input type="radio"  name="data[become]" value="3" {if $data['become'] ==3} checked="checked"{/if} data-needcheck="1" onclick="showBecome(this)"/> 消费金额</label>
						<label class="radio-inline"><input type="radio"  name="data[become]" value="4" {if $data['become'] ==4} checked="checked"{/if} data-needcheck="1" onclick="showBecome(this)"/> 购买商品</label>
					{else}
						{if $data['become'] ==0}无条件{/if}
						{if $data['become'] ==1}申请{/if}
						{if $data['become'] ==2}消费次数{/if}
						{if $data['become'] ==3}消费金额{/if}
						{if $data['become'] ==4}购买商品{/if}
					{/if}
                </div> 
            </div>
           <div class="form-group become become2"  {if $data['become']!='2' }style="display:none"{/if}>
                    <label class="col-lg control-label "></label>
                    <div class="col-sm-9 col-xs-12">
                    	{ifp 'commission.set.edit'}
                           <div class='input-group' >
	                            <div class='input-group-addon'>消费达到</div>
	                            <input type='text' class='form-control' name='data[become_ordercount]' value="{$data['become_ordercount']}" />
	                            <div class='input-group-addon'>次</div>
                        	</div>
                        {else}
                        	消费达到 {$data['become_ordercount']}次
                        {/if}
                    </div>
           </div>
          <div class="form-group  become become3" {if $data['become']!='3' }style="display:none"{/if}>
                    <label class="col-lg control-label" ></label>
                    <div class="col-sm-9 col-xs-12">
                    	{ifp 'commission.set.edit'}
                           <div class='input-group' >
	                            <div class='input-group-addon'>消费达到</div>
	                            <input type='text' class='form-control' name='data[become_moneycount]' value="{$data['become_moneycount']}" />
	                            <div class='input-group-addon'>元</div>
	                        </div>
	                    {else}
	                    	消费达到 {$data['become_moneycount']}元
	                    {/if}
                    </div>
           </div>
         <div class="form-group  become become4" {if $data['become']!='4' }style="display:none"{/if}>
                    <label class="col-lg control-label" ></label>
                    <div class="col-sm-9 col-xs-12">
                    	{ifp 'commission.set.edit'}
                              {php echo tpl_selector('become_goodsid',array('url'=>webUrl('goods/query'), 'items'=>$goods,'buttontext'=>'选择商品','placeholder'=>'请输入商品标题','preview'=>false))}
                        {else}
                        	{if !empty($goods)}
                        		<a href="{php echo webUrl('goods/edit',array('id'=>$goods['id']))}" target="_blank">{$goods['title']}(ID: {$goods['id']})</a>
                        	{else}
                        		未选择商品
                        	{/if}
                        {/if}
                    </div>
           </div>
   
    
          <div class="form-group becomecon">
                <label class="col-lg control-label"></label>
                <div class="col-sm-5 becomecheck">
                	{ifp 'commission.set.edit'}
                    <label class="radio-inline"><input type="radio"  name="data[become_check]" value="0" {if $data['become_check'] ==0} checked="checked"{/if} /> 需要</label>
                    <label class="radio-inline"><input type="radio"  name="data[become_check]" value="1" {if $data['become_check'] ==1} checked="checked"{/if} /> 不需要</label>
                    <span class="help-block">是否需要审核</span>
                    {else}
                    	{if $data['become_check']==0}需要审核{else}不需要审核{/if}
                    {/if}
                </div>
                <div class="col-sm-4 becomeconsume"  {if empty($data['become']) || $data['become']=='1'}style="display:none"{/if}>
                	{ifp 'commission.set.edit'}
                    <label class="radio-inline"><input type="radio"  name="data[become_order]" value="0" {if $data['become_order'] ==0} checked="checked"{/if} /> 付款后</label>
                    <label class="radio-inline"><input type="radio"  name="data[become_order]" value="1" {if $data['become_order'] ==1} checked="checked"{/if} /> 完成后</label>
                    <span class="help-block">消费条件统计的方式</span>
                    {else}
                    	消费条件统计的方式: {if $data['become_order'] ==0}付款后{else}完成后{/if}
                    {/if}
                </div>
           </div>

            <div class="form-group protocol-group" {if $data['become'] !=1}style="display: none;"{/if}>
            <label class="col-lg control-label">显示申请协议</label>
            <div class="col-sm-8">
                {ifp 'commission.set.edit'}
                <label class="radio-inline"><input type="radio"  name="data[open_protocol]" value="1" {if $data['open_protocol'] ==1} checked="checked"{/if} /> 显示</label>
                <label class="radio-inline"><input type="radio"  name="data[open_protocol]" value="0" {if $data['open_protocol'] ==0} checked="checked"{/if} /> 隐藏</label>
                {else}
                {if $data['open_protocol'] ==0}隐藏{else}显示{/if}
                {/if}
            </div>
            </div>

           <div class="form-group">
                <label class="col-lg control-label">分销商必须完善资料</label>
                <div class="col-sm-9 col-xs-12">
                	{ifp 'commission.set.edit'}
                    <label class="radio-inline"><input type="radio"  name="data[become_reg]" value="0" {if $data['become_reg'] ==0} checked="checked"{/if} /> 需要</label>
                    <label class="radio-inline"><input type="radio"  name="data[become_reg]" value="1" {if $data['become_reg'] ==1} checked="checked"{/if} /> 不需要</label>
                    <span class="help-block">分销商在分销或提现时是否必须完善资料</span>
                    {else}
                    	分销商在分销或提现时是否必须完善资料: {if $data['become_reg'] ==0}需要{else}不需要{/if}
                    {/if}
                </div>
           </div>

            <div class="form-group">
                <label class="col-lg control-label">非分销商链接</label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'commission.set.edit'}
                    <input type="text" name="data[no_commission_url]" class="form-control" value="{$data['no_commission_url']}">
                    {else}
                    {$data['no_commission_url']}
                    {/if}
                    <span class="help-block">自定义非分销商点击分销中心链接 ; 如果不填写 则走默认;<span class="text text-danger">（小程序暂未支持）</span></span>
                </div>
            </div>
        